Electronic circuits capable of performing digital computations have become ubiquitous in consumer and industrial products and are used in countless applications. Digital logic circuitry has heavily relied on binary representation of data for decades due to its compact storage requirements. The advantage of the positional binary representation stems from the logarithmic space requirements of binary numbers, i.e., represent N discrete values requires only log(N) bits.
However, binary representation comes with a cost. Since the binary number system is positional, processing binary numbers may include “unpacking” bits, performing computations, and repacking the bits back to binary. For example, computations such as multiplication and addition need to “unpack” the number by either generating partial products in the case of multiplication, or working with a carry chain in the case of addition. As a result, circuits designed to perform operations on binary representations of values often require larger, more complex computational logic.
One alternative to binary representation is a unary number system, which is a simpler, less compact technique for representing values. In a unary representation, N bits are used, out of which the M bits are set to 1 to represent a value M or a value of M/N. Performing computations on unary bit streams may require less complex digital logic than binary circuits, but typically requires serial operations on unary bit streams. Moreover, conventional techniques for processing unary bit streams, including stochastic computing and parallel unary computing, often have inherent limitations on the types of functions that can be implemented and these limitations may lead to significant approximation errors.